<div id="top-panel">
    <div id="panel">
        <ul>
            <li><a href="<?php echo site_url("trivia/create"); ?>" class="report">Create</a></li>   
            <li><a href="<?php echo site_url("trivia/assign"); ?>" class="report">Publish game to EKOKIOSK device</a></li>         	
        </ul>
    </div>
</div>
<div id="wrapper">
	<div id="content">		
		<div id="rightnow">
			<h3 class="reallynow">Trivia game list</h3>
			<div class="search_wrap">			
				<?php echo form_open('trivia/search', array('class'=>'form_search')) ?>
				Search: <input type="text" name="search_text" id="search_text" class="input" />
			</div>
			<?php if (count($trivia)): ?>
			<table width="100%">
				<thead>
					<tr>
						<th>Title</th>	
						<th>Question</th>
						<th>Task</th>					
					</tr>
				</thead>
				<tbody>
					<?php foreach($trivia as $v): ?>
					<tr>
						<td><div style="padding-left:10px;"><a class="tool" href="<?php echo site_url("trivia/edit/".$v['id']); ?>"><?php echo $v['title']; ?></a></div></td>
						<td><div style="padding-left:10px;"><a class="tool" href="<?php echo site_url("question/filter/".$v['id']); ?>">List question</a></div></td>
						<td><div align="center"><a class="tool" href="<?php echo site_url("trivia/delete/".$v['id']); ?>">Delete</a></div></td>
					</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
			<div id="pager">
				<?php echo $this->pagination->create_links(); ?>
			</div>
			<?php else: ?>
				<p>No data to display</p>
			<?php endif; ?>
		</div>
	</div>
</div>